package com.yn.iotxiao.sql.entity.Group;

import com.gitee.sunchenbin.mybatis.actable.annotation.*;
import com.gitee.sunchenbin.mybatis.actable.constants.MySqlTypeConstant;
import jakarta.validation.constraints.NotNull;
import lombok.Data;

import java.util.Date;

@Data
@Table(name = "GroupInfo", comment = "分组信息")
public class GroupInfo {

    @IsKey
    private String id;

    @Column
    @NotNull(message = "名称不能为空")
    private String title;
    @Column(comment = "0、学生，1、住校，2、走读，10、老师")
    private String type;
    @Column
    private int ordernum;

    @Column(name = "CREATETIME",comment = "录入时间")
    @ColumnType(MySqlTypeConstant.TIMESTAMP)
    @DefaultValue("CURRENT_TIMESTAMP")
    private Date createTime;
}
